package com.example.collection;


import org.junit.Test;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class ListSetTest {

    @Test
    public void test01(){

       Set set = new HashSet();
       set.add("aa");
       set.add(4);
       set.add(1);
       set.add(2);
       set.add(3);
      // set.forEach(a-> System.out.println(a));
        Iterator iterator = set.iterator();
        while(iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }
}
